<template>
    <h3>爷爷组件</h3>
    <div>{{ msg }}</div>
    <hr/>
    <B></B>
</template>
<script setup>
import B from './components/B.vue'
import { provide, ref } from 'vue'
const msg = ref('Hello World')
// 提供一个依赖，依赖就是一个响应式数据
provide('data', msg)
provide('fun', value => msg.value = value)
</script>
<style scoped>
    
</style>